package com.wmh.baseservice.system.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2021-12-26
 */
@ApiModel(value="SysCategory对象", description="系统分类表")
public class SysCategory implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态:	0")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "分类名称")
    private String name;

    @ApiModelProperty(value = "上级id")
    private Long parentId;

    @ApiModelProperty(value = "1商品分类 2蔬菜种类")
    private Integer type;

    public Long getId() {
        return id;
    }

    public SysCategory setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public SysCategory setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public SysCategory setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public SysCategory setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public SysCategory setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public SysCategory setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public String getName() {
        return name;
    }

    public SysCategory setName(String name) {
        this.name = name;
        return this;
    }
    public Long getParentId() {
        return parentId;
    }

    public SysCategory setParentId(Long parentId) {
        this.parentId = parentId;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public SysCategory setType(Integer type) {
        this.type = type;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String NAME = "name";

    public static final String PARENT_ID = "parent_id";

    public static final String TYPE = "type";

    @Override
    public String toString() {
        return "SysCategory{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", name=" + name +
            ", parentId=" + parentId +
            ", type=" + type +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            SysCategory.ID
            ,SysCategory.STATUS
            ,SysCategory.REMARK
            ,SysCategory.VERSION
            ,SysCategory.CREATE_TIME
            ,SysCategory.UPDATE_TIME
            ,SysCategory.NAME
            ,SysCategory.PARENT_ID
            ,SysCategory.TYPE
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}